/*
 * @Author: szx
 * @Date: 2022-03-16 13:54:13
 * @LastEditTime: 2022-03-16 13:55:21
 * @Description:
 * @FilePath: \leetcode\1-99\55\55_2.js
 */
/**
 * @param {number[]} nums
 * @return {boolean}
 */
var canJump = function (nums) {
    let max = 0;
    for (let i = 0; i < nums.length; i++) {
        if (max < i) return false;
        max = Math.max(max, i + nums[i]);
    }
    return true;
};
